package com.weifangfirecontrolformal.weifangfirecontrolformal.web.service.check.inspectionplan;

import cn.hutool.json.JSONObject;
import com.weifangfirecontrolformal.weifangfirecontrolformal.common.base.BaseService;
import com.weifangfirecontrolformal.weifangfirecontrolformal.support.model.RespEntity;
import com.weifangfirecontrolformal.weifangfirecontrolformal.support.utils.requestutil.HttpRequestUtil;
import lombok.extern.slf4j.Slf4j;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;

@Service
@Slf4j
public class InspectionPlanService extends BaseService {

	private static final Logger logger = LoggerFactory.getLogger(InspectionPlanService.class);


	/**
	 * 检查计划添加
	 * @param
	 * @return
	 */
	public RespEntity inspectionPlanAdd(JSONObject jsonParam) {
		jsonParam = HttpRequestUtil.commonHttpRequestParamConvert(getRequest());
		return restJava(jsonParam,"checkJava","inspectionPlanAdd","inspectionPlan");
	}

	/**
	 * 检查计划列表
	 * @param
	 * @return
	 */
	public RespEntity inspectionPlanListPage(JSONObject jsonParam) {
		jsonParam = HttpRequestUtil.commonHttpRequestParamConvert(getRequest());
		return restJava(jsonParam,"checkJava","inspectionPlanListPage","inspectionPlan");
	}

	/**
	 * 检查计划详情
	 * @param
	 * @return
	 */
	public RespEntity inspectionPlanDetail(JSONObject jsonParam) {
		jsonParam = HttpRequestUtil.commonHttpRequestParamConvert(getRequest());
		return restJava(jsonParam,"checkJava","inspectionPlanDetail","inspectionPlan");
	}

	/**
	 * 检查计划列表(app)
	 * @param
	 * @return
	 */
	public RespEntity inspectionPlanForAppListPage(JSONObject jsonParam) {
		jsonParam = HttpRequestUtil.commonHttpRequestParamConvert(getRequest());
		return restJava(jsonParam,"checkJava","inspectionPlanForAppListPage","inspectionPlan");
	}

	/**
	 * 判断今天是否还可以巡检(app)
	 * @param
	 * @return
	 */
	public RespEntity canCheckOrNo(JSONObject jsonParam) {
		jsonParam = HttpRequestUtil.commonHttpRequestParamConvert(getRequest());
		return restJava(jsonParam,"checkJava","canCheckOrNo","inspectionPlan");
	}

	/**
	 * 计划巡检点列表(app)
	 * @param
	 * @return
	 */
	public RespEntity checkaddrForAppListPage(JSONObject jsonParam) {
		jsonParam = HttpRequestUtil.commonHttpRequestParamConvert(getRequest());
		return restJava(jsonParam,"checkJava","checkaddrForAppListPage","inspectionPlan");
	}

	/**
	 * 检查计划详情
	 * @param
	 * @return
	 */
	public RespEntity inspectionForAppPlanDetail(JSONObject jsonParam) {
		jsonParam = HttpRequestUtil.commonHttpRequestParamConvert(getRequest());
		return restJava(jsonParam,"checkJava","inspectionForAppPlanDetail","inspectionPlan");
	}

	/**
	 * 检查计划删除
	 * @param
	 * @return
	 */
	public RespEntity inspectionPlanDelete(JSONObject jsonParam) {
		jsonParam = HttpRequestUtil.commonHttpRequestParamConvert(getRequest());
		return restJava(jsonParam,"checkJava","inspectionPlanDelete","inspectionPlan");
	}

}
